<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Linux 系统日志排查指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        /* 首字下沉效果 */
        .drop-cap::first-letter {
            float: left;
            font-size: 4rem;
            line-height: 3rem;
            padding-right: 0.5rem;
            margin-top: 0.5rem;
            font-weight: 700;
            color: #4a5568;
            font-family: 'Noto Serif SC', serif;
        }
        
        /* 代码块美化 */
        .code-block {
            background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
            border-radius: 12px;
            padding: 1.5rem;
            margin: 1.5rem 0;
            position: relative;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        
        .code-block::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
        }
        
        .code-block code {
            color: #e2e8f0;
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 0.9rem;
            line-height: 1.6;
        }
        
        /* 卡片悬停效果 */
        .hover-card {
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .hover-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }
        
        /* 标题装饰线 */
        .title-decoration {
            position: relative;
            display: inline-block;
        }
        
        .title-decoration::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        
        /* 列表项美化 */
        .custom-list li {
            position: relative;
            padding-left: 2rem;
            margin-bottom: 1rem;
        }
        
        .custom-list li::before {
            content: '\f054';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            left: 0;
            color: #667eea;
            font-size: 0.8rem;
            top: 0.3rem;
        }
        
        /* 滚动动画 */
        .fade-in {
            opacity: 0;
            transform: translateY(20px);
            animation: fadeIn 0.8s ease forwards;
        }
        
        @keyframes fadeIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Mermaid 图表样式 */
        .mermaid {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>
<body>
    <!-- Hero 区域 -->
    <section class="relative overflow-hidden bg-gradient-to-br from-gray-900 via-purple-900 to-gray-900 text-white">
        <div class="absolute inset-0 bg-black opacity-50"></div>
        <div class="relative container mx-auto px-6 py-24">
            <div class="max-w-4xl mx-auto text-center fade-in">
                <h1 class="text-5xl md:text-7xl font-bold mb-6 leading-tight">
                    Linux 系统日志
                    <span class="block text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-400">
                        排查完全指南
                    </span>
                </h1>
                <p class="text-xl md:text-2xl text-gray-300 mb-8 leading-relaxed">
                    掌握系统日志分析技巧，快速定位并解决 Linux 系统问题
                </p>
                <div class="flex justify-center space-x-4">
                    <div class="bg-white bg-opacity-10 backdrop-blur-lg rounded-lg px-6 py-3">
                        <i class="fas fa-terminal mr-2"></i>
                        命令行工具
                    </div>
                    <div class="bg-white bg-opacity-10 backdrop-blur-lg rounded-lg px-6 py-3">
                        <i class="fas fa-search mr-2"></i>
                        问题诊断
                    </div>
                    <div class="bg-white bg-opacity-10 backdrop-blur-lg rounded-lg px-6 py-3">
                        <i class="fas fa-chart-line mr-2"></i>
                        性能分析
                    </div>
                </div>
            </div>
        </div>
        <div class="absolute bottom-0 left-0 right-0">
            <svg viewBox="0 0 1440 120" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M0 120L60 105C120 90 240 60 360 45C480 30 600 30 720 37.5C840 45 960 60 1080 67.5C1200 75 1320 75 1380 75L1440 75V120H1380C1320 120 1200 120 1080 120C960 120 840 120 720 120C600 120 480 120 360 120C240 120 120 120 60 120H0Z" fill="white"/>
            </svg>
        </div>
    </section>

    <!-- 主要内容区域 -->
    <main class="container mx-auto px-6 py-12 max-w-6xl">
        
        <!-- 引言部分 -->
        <section class="mb-16 fade-in" style="animation-delay: 0.2s">
            <div class="bg-white rounded-2xl shadow-xl p-8 md:p-12">
                <p class="text-lg text-gray-700 leading-relaxed drop-cap">
                    在 Linux 系统中，通过系统日志排查问题是诊断和解决问题的关键方法。Linux 系统日志记录了系统、内核、应用程序及服务的运行状态、错误和警告。掌握日志分析技能，能够帮助系统管理员快速定位问题根源，确保系统稳定运行。
                </p>
            </div>
        </section>

        <!-- 常见日志文件 -->
        <section class="mb-16 fade-in" style="animation-delay: 0.3s">
            <h2 class="text-4xl font-bold text-gray-800 mb-8">
                <span class="title-decoration">
                    <i class="fas fa-file-alt mr-3 text-purple-600"></i>
                    常见日志文件的位置和内容
                </span>
            </h2>
            
            <div class="grid md:grid-cols-2 gap-6">
                <!-- 系统日志卡片 -->
                <div class="bg-white rounded-xl shadow-lg p-6 hover-card">
                    <div class="flex items-center mb-4">
                        <div class="w-12 h-12 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center text-white">
                            <i class="fas fa-server"></i>
                        </div>
                        <h3 class="text-xl font-semibold ml-4">系统核心日志</h3>
                    </div>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/messages</code>
                            <span class="ml-2 text-gray-600 text-sm">系统通用消息和错误日志</span>
                        </li>
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/syslog</code>
                            <span class="ml-2 text-gray-600 text-sm">系统日志（部分发行版）</span>
                        </li>
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/dmesg</code>
                            <span class="ml-2 text-gray-600 text-sm">内核环形缓冲区日志</span>
                        </li>
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/kern.log</code>
                            <span class="ml-2 text-gray-600 text-sm">内核消息日志</span>
                        </li>
                    </ul>
                </div>

                <!-- 服务日志卡片 -->
                <div class="bg-white rounded-xl shadow-lg p-6 hover-card">
                    <div class="flex items-center mb-4">
                        <div class="w-12 h-12 bg-gradient-to-br from-green-500 to-green-600 rounded-lg flex items-center justify-center text-white">
                            <i class="fas fa-cogs"></i>
                        </div>
                        <h3 class="text-xl font-semibold ml-4">服务相关日志</h3>
                    </div>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/auth.log</code>
                            <span class="ml-2 text-gray-600 text-sm">认证相关日志</span>
                        </li>
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/boot.log</code>
                            <span class="ml-2 text-gray-600 text-sm">系统启动日志</span>
                        </li>
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/httpd/</code>
                            <span class="ml-2 text-gray-600 text-sm">Apache Web服务器日志</span>
                        </li>
                        <li class="flex items-start">
                            <code class="bg-gray-100 px-2 py-1 rounded text-sm font-mono text-purple-600">/var/log/nginx/</code>
                            <span class="ml-2 text-gray-600 text-sm">Nginx Web服务器日志</span>
                        </li>
                    </ul>
                </div>
            </div>
        </section>

        <!-- 排查流程图 -->
        <section class="mb-16 fade-in" style="animation-delay: 0.4s">
            <h2 class="text-4xl font-bold text-gray-800 mb-8">
                <span class="title-decoration">
                    <i class="fas fa-project-diagram mr-3 text-purple-600"></i>
                    系统问题排查流程
                </span>
            </h2>
            
            <div class="bg-white rounded-2xl shadow-xl p-8">
                <div class="mermaid">
                    graph TD
                        A[发现系统问题] --> B{问题类型判断}
                        B -->|性能问题| C[查看系统负载]
                        B -->|服务异常| D[检查服务状态]
                        B -->|认证问题| E[查看认证日志]
                        B -->|硬件问题| F[查看内核日志]
                        
                        C --> G[使用 top/htop 分析]
                        D --> H[systemctl status]
                        E --> I[/var/log/auth.log]
                        F --> J[dmesg 命令]
                        
                        G --> K[定位问题进程]
                        H --> L[查看服务日志]
                        I --> M[分析登录失败]
                        J --> N[检查硬件错误]
                        
                        K --> O[解决方案]
                        L --> O
                        M --> O
                        N --> O
                        
                        style A fill:#f9f,stroke:#333,stroke-width:4px
                        style O fill:#9f9,stroke:#333,stroke-width:4px
                </div>
            </div>
        </section>

        <!-- 排查步骤详解 -->
        <section class="mb-16 fade-in" style="animation-delay: 0.5s">
            <h2 class="text-4xl font-bold text-gray-800 mb-8">
                <span class="title-decoration">
                    <i class="fas fa-tasks mr-3 text-purple-600"></i